package com.rover.entity.system;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.grid.ViewField;

/**
 * 编码
 * 
 */
@Entity
@Table(name = "S_Code")
public class Code implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@ViewField(header = "编号", width = 200)
	private Long id;
	@ViewField(header = "编码名称", width = 200)
	private String name;
	@ViewField(header = "描述", width = 300)
	private String description;
	@ViewField(header = "编码树", width = 60,type="code",attributes="是否")
	private int isTree;

	

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY) 
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(nullable = false, unique = true)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDescription() {
		return description;
	}

	public void setIsTree(int isTree) {
		this.isTree = isTree;
	}

	public int getIsTree() {
		return isTree;
	}

}
